﻿using Microsoft.EntityFrameworkCore;
using IdentityServerManagement.ApiResources;
using IdentityServerManagement.ApiScopes;
using IdentityServerManagement.Clients;
using IdentityServerManagement.Devices;
using IdentityServerManagement.Grants;
using IdentityServerManagement.IdentityResources;
using Volo.Abp.MultiTenancy;
using Xms.Abp.Storage;
using Xms.Abp.Data;

namespace IdentityServerManagement.Storage
{
    //[IgnoreMultiTenancy]
    [DynamicConnStringName(typeof(IdentityServerManagementDbProperties), nameof(IdentityServerManagementDbProperties.ConnStringName))]
    public interface IIdentityServerStorage : IXmsStorage
    {
        #region ApiResource

        DbSet<ApiResource> ApiResources { get; }

        DbSet<ApiResourceSecret> ApiResourceSecrets { get; }

        DbSet<ApiResourceClaim> ApiResourceClaims { get; }

        DbSet<ApiResourceScope> ApiResourceScopes { get; }

        DbSet<ApiResourceProperty> ApiResourceProperties { get; }

        #endregion

        #region ApiScope

        DbSet<ApiScope> ApiScopes { get; }

        DbSet<ApiScopeClaim> ApiScopeClaims { get; }

        DbSet<ApiScopeProperty> ApiScopeProperties { get; }

        #endregion

        #region IdentityResource

        DbSet<IdentityResource> IdentityResources { get; }

        DbSet<IdentityResourceClaim> IdentityClaims { get; }

        DbSet<IdentityResourceProperty> IdentityResourceProperties { get; }

        #endregion

        #region Client

        DbSet<Client> Clients { get; }

        DbSet<ClientGrantType> ClientGrantTypes { get; }

        DbSet<ClientRedirectUri> ClientRedirectUris { get; }

        DbSet<ClientPostLogoutRedirectUri> ClientPostLogoutRedirectUris { get; }

        DbSet<ClientScope> ClientScopes { get; }

        DbSet<ClientSecret> ClientSecrets { get; }

        DbSet<ClientClaim> ClientClaims { get; }

        DbSet<ClientIdPRestriction> ClientIdPRestrictions { get; }

        DbSet<ClientCorsOrigin> ClientCorsOrigins { get; }

        DbSet<ClientProperty> ClientProperties { get; }

            #endregion

        DbSet<PersistedGrant> PersistedGrants { get; }

        DbSet<DeviceFlowCodes> DeviceFlowCodes { get; }
    }
}
